home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / TouchMe 1.1.1.sit / touchMe 1.11 Folder / scripts / sample 4 < prev    next >
Text File  |  1996-08-08  |  666b  |  20 lines

  1. -- Sample AppleScripts for touchMe, 1996 (C) Mizutori Tetsuya
  2. -- An applet to check the date time stamp of the given file,
  3. -- and if the stamp is wrong then correct it to have the same date.
  4. -- Let's start to select a target file!
  5.  
  6. set theFile to (choose file)
  7.  
  8. tell application "touchMe"
  9.     activate
  10.     set theStamp to fetch theFile
  11.     set theCreationDate to the creation date of theStamp
  12.     set theModificationDate to the modification date of theStamp
  13.     if theCreationDate comes after theModificationDate then
  14.         beep
  15.         set prefs creation to {enabled:false}
  16.         set prefs modification to {enabled:true, flag:exact, value:theCreationDate}
  17.         touch theFile
  18.     end if
  19.     quit
  20. end tell